<template>
  <div class="policy-list-wrap">
    <template>
      <div class="policy-list-item" v-for="item in contentList" :key="item.id">
        <div class="policy-item-left">
          <IconWrap :width="170" :height="120" :url="picUrl(item.firstPic)">
          </IconWrap>
        </div>
        <div class="policy-item-right">
          <div class="policy-title" @click="toDetails(item)">
            {{ item.title }}
          </div>
          <div class="policy-content" v-html="item.content"></div>
          <div class="policy-time">发布日期：{{ item.pulishDate }}</div>
        </div>
      </div>
    </template>
  </div>
</template>

<script>
export default {
  props: {
    contentList: Array
  },
  data() {
    return {
      total: 0
    }
  },
  methods: {
    picUrl(val) {
      if (val) {
        return  val.filePath
      }
      return require('../../../../public/static/noImg.png')
    },
    toDetails(item) {
      this.$emit('clickDetail', item)
    }
  }
}
</script>

<style lang="scss" scoped>
</style>
